<template>
		<table class="table131">
			<tbody>
				<tr v-if="showHeader">
					<td class="w30">Date</td>
					<td class="tac" colspan="2">{{ date.year }}-{{ date.month }}-{{ date.day }}</td>
				</tr>
				<tr v-if="showHeader">
					<td class="w30">P/L NO</td>
					<td class="tac" colspan="2">{{ jobno }}</td>
				</tr>
				<tr>
					<td class="w30"></td>
					<td class="tac w35">Sales</td>
					<td class="tac w35">Cost</td>
				</tr>
				<!-- list -->
				<template v-for="item in list">
					<tr>
						<td class="w30">Company</td>
						<td class="tac w35">{{item.yscorp}}</td>
						<td class="tac w35">{{ item.yfcorp }}</td>
					</tr>
					<tr>
						<td class="w30">ITEM/PARTICULAR</td>
						<td class="tac w35">{{item.ysitemen }}</td>
						<td class="tac w35">{{ item.yfitemen }}</td>
					</tr>
					<tr v-if="item.ysmoneytype ">
						<td class="w30">ORIGINAL AMOUNT</td>
						<td class="tac w35">{{ item.ysmoneytype + item.ysmoney0  }}</td>
						<td class="tac w35">{{ item.yfmoneytype + item.yfmoney0 }}</td>
					</tr>
					<tr v-if="item.ysmoneytype ">
						<td class="w30">AMENDED AMOUNT</td>
						<td class="tac w35">{{ item.ysmoneytype + item.ysmoney0  }}</td>
						<td class="tac w35">{{ item.yfmoneytype + item.yfmoney0 }}</td>
					</tr>
				</template>
				
<!-- Net Amt -->
				
				<tr v-if="list.length">
					<td class="w30">AMENDED AMOUNT</td>
					<td class="w35">￥:{{list[0].ysrmb}} <span class="fr">$:{{ list[0].ysusd }}</span></td>
					<td class="w35">￥:{{list[0].yfrmb}} <span class="fr">$:{{ list[0].yfusd }}</span></td>
				</tr>
				<tr v-if="list.length">
					<td class="w30">AMENDMENT REASON</td>
					<td colspan="2">￥:{{ list[0].ysrmb - list[0].yfrmb  }}<span style="margin-left:100px;"> $:{{ list[0].ysusd - list[0].yfusd }}</span></td>
				</tr>
			</tbody>
		</table>
</template>
<script setup lang="ts">

import { onMounted, reactive } from "vue"


interface Props {
	showHeader:boolean
	jobno:string
	date:any
  list:any
}

const props = withDefaults(defineProps<Props>(), {
	showHeader:false,
	jobno:'',
	date:{},
  list:[],
})

</script>

<style lang="scss" scoped>
@import '../../../../styles/print.css';
</style>